DEFINE VARIABLE vend AS CHARACTER FORMAT "x(16)".
DEFINE VARIABLE ucode AS CHARACTER FORMAT "x(16)".
    


INPUT FROM VALUE("c:\ucode.csv").
    


REPEAT ON ERROR UNDO, LEAVE:

   

  IMPORT DELIMITER "," vend ucode NO-ERROR.
  DISPLAY vend ucode. 
  FIND FIRST acf_mstr WHERE acf_vend = vend AND acf_acct = "2121" EXCLUSIVE-LOCK NO-ERROR.
  IF AVAILABLE acf_mstr THEN DO:
      ASSIGN acf_u8ac = ucode NO-ERROR.
      DISP acf_vend acf_u8ac .
   END.
/*    ELSE DO:                      */
/*                                  */
/*        CREATE acf_mstr.          */
/*        ASSIGN acf_vend = vend    */
/*               acf_u8ac = ucode.  */
/*    END.                          */
  


END.


INPUT CLOSE.
